package com.yenlien.traceyun.plant.bean;

import lombok.Data;

import java.io.Serializable;

/**
 * @Date 2022/8/19
 * @Author jiaLong
 * @Descript 构建成本DTO
 */
@Data
public class CostDTO implements Serializable {
    private static final long serialVersionUID = 1777172069862291950L;

    private String name;

    private String orderNo;

    private String buyTime;

    private String price;

    private String number;

    private String totalPrice;

    private CostDTO(Builder builder) {
        this.name = builder.name;
        this.orderNo = builder.orderNo;
        this.buyTime = builder.buyTime;
        this.price = builder.price;
        this.number = builder.number;
        this.totalPrice = builder.totalPrice;
    }

    public static CostDTO.Builder custom() {
        return new CostDTO.Builder();
    }

    public static final class Builder{
        private String name;
        private String orderNo;
        private String buyTime;
        private String price;
        private String number;
        private String totalPrice;

        public CostDTO build(){
            return new CostDTO(this);
        }

        public Builder name(String name){
            this.name = name;
            return this;
        }
        public Builder orderNo(String orderNo){
            this.orderNo = orderNo;
            return this;
        }
        public Builder buyTime(String buyTime){
            this.buyTime = buyTime;
            return this;
        }
        public Builder price(String price){
            this.price = price;
            return this;
        }
        public Builder number(String number){
            this.number = number;
            return this;
        }
        public Builder totalPrice(String totalPrice){
            this.totalPrice = totalPrice;
            return this;
        }
    }
}
